package com.sutuijingling.bean;

import java.io.Serializable;
import org.apache.commons.lang.c;
import org.json.JSONException;
import org.json.JSONObject;

public class i implements Serializable {
    boolean a = false;
    String b;
    String c;
    String d;
    String e;

    public static i d(String str) throws JSONException {
        JSONObject jSONObject = new JSONObject(str);
        i iVar = new i();
        if (jSONObject.has("ip")) {
            iVar.c = jSONObject.getString("ip");
        }
        if (jSONObject.has("city")) {
            iVar.b = jSONObject.getString("city");
        }
        if (jSONObject.has("isp")) {
            iVar.d = jSONObject.getString("isp");
        }
        return iVar;
    }

    public void a(String str) {
        this.b = str;
    }

    public boolean a(i iVar) {
        return iVar != null && c.a(this.d, iVar.d) && c.a(this.b, iVar.b);
    }

    public void b(String str) {
        this.c = str;
    }

    public void c(String str) {
        this.d = str;
    }

    public String toString() {
        return "NetworkBean [isVpn=" + this.a + ", city=" + this.b + ", sampleIp=" + this.c + ", isp=" + this.d + ", routeName=" + this.e + "]";
    }
}
